import Recorder from "./recorder"
import Sound from "./source"
import Video from "./video"

export default class media{
  constructor(){
    this.buff = []
  }

  newSound(path){
    var obj = new Sound()
    this.buff.push(obj)
    return obj
  }
  newVideo(path){
    var obj = new Video()
    this.buff.push(obj)
    return obj
  }

  loadImage(obj) {
    return wx.chooseImage(obj)
  }
  previewImage(obj) {
    return wx.previewImage(obj)
  }
  saveImage(obj) {
    return wx.saveImageToPhotosAlbum(obj)
  }
}
